<% if @order && @order.invoice %>
  <% if @order.invoice_state == "ready"%>
    <li>
      <%= link_to t('spree.invoice.create'), admin_order_create_invoice_path(@order), :class => 'icon-file-alt button' %>
    </li>
  <% elsif @order.invoice_state == "invoiced" %>
    <li>
      <%= link_to t('spree.invoice.invoice'), admin_order_invoice_path(@order,@order.invoice), :class => 'icon-download-alt button' %>
    </li>
    <li>
      <%= link_to t('spree.invoice.resend_invoice'), admin_order_send_invoice_path(@order,@order.invoice), :class => 'icon-share button' %>
    </li>
  <% end %>
<% end %>